package com.example.testdemoutils.openFeign;

import com.alibaba.fastjson2.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.validation.Valid;

//此处name需要设置不为空，url需要在.properties中设置
@Service
@FeignClient(url = "http://192.168.0.69:8380/jeecg-boot", name = "service2")
public interface FeignService {
    @PutMapping(value = "/user/user/userChangeStatus")
    @ResponseBody
    String getMessage(@Valid @RequestBody JSONObject jsonObject);
}
